﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace dlg
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Dlg1 d = new Dlg1();
            d.Size = new Size(300, 200);
            //d.ShowDialog(this); // 打开模态对话框

            if(d.ShowDialog(this) == DialogResult.OK)
            {
                textBox1.Text = d.textBox1.Text;
            }

        }
    }
}
